﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace Smoke
{
    public partial class VisionSet : Form
    {
        public XmlDocument doc;
        private VisionSet()
        {
            InitializeComponent();
        }
        private static VisionSet _instace;
        public static VisionSet Instance
        {
            get {
                if (_instace == null)
               
                    _instace = new VisionSet();

                return _instace;
            }
           
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            this.Hide();
            JosnConfig.WriteConfig("Roi宽度", txbRoiWidth.Text.ToString());
            JosnConfig.WriteConfig("MinGray", txbMinGray.Text.ToString());
            JosnConfig.WriteConfig("引脚间隙比率", txbRate.Text.ToString());
            JosnConfig.WriteConfig("开口角度最小值", txbMinDeg.Text.ToString());
            JosnConfig.WriteConfig("开口角度最大值", txbMaxDeg.Text.ToString());

        }
    }
}
